﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="information_detail.aspx.cs" Inherits="Web.Admin.information_detail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataKeyNames="InfoID" DataSourceID="odsInformation" Height="16px" 
        Width="782px" AutoGenerateEditButton="True" 
        AutoGenerateInsertButton="True" DefaultMode="Insert" 
        oniteminserted="DetailsView1_ItemInserted">
        <Fields>
            <asp:BoundField DataField="Title" HeaderText="标题" />
            <asp:TemplateField HeaderText="城市">
                <EditItemTemplate>
                    <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="sdsAreaList" 
                        DataTextField="AreaName" DataValueField="AreaID" 
                        SelectedValue='<%# Bind("AreaID") %>'>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="sdsAreaList" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        SelectCommand="SELECT [AreaID], [AreaName], [Deep] FROM [Sys_Area] WHERE ([Deep] = @Deep) ORDER BY Sort">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="1" Name="Deep" Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="sdsAreaList" 
                        DataTextField="AreaName" DataValueField="AreaID" 
                        SelectedValue='<%# Bind("AreaID") %>'>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="sdsAreaList" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        SelectCommand="SELECT [AreaID], [AreaName], [Deep] FROM [Sys_Area] WHERE ([Deep] = @Deep) ORDER BY Sort">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="1" Name="Deep" Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("AreaName") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="所属类别">
                <EditItemTemplate>
                    <asp:DropDownList ID="DropDownList2" runat="server" 
                        SelectedValue='<%# Bind("corpTypeID") %>'>
                        <asp:ListItem Value="1">餐饮美食</asp:ListItem>
                        <asp:ListItem Value="2">夜场酒吧</asp:ListItem>
                        <asp:ListItem Value="3">娱乐休闲</asp:ListItem>
                        <asp:ListItem Value="4">旅游度假</asp:ListItem>
                        <asp:ListItem Value="5">时尚购物</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:DropDownList ID="DropDownList2" runat="server" 
                        SelectedValue='<%# Bind("corpTypeID") %>'>
                        <asp:ListItem Value="1">餐饮美食</asp:ListItem>
                        <asp:ListItem Value="2">夜场酒吧</asp:ListItem>
                        <asp:ListItem Value="3">娱乐休闲</asp:ListItem>
                        <asp:ListItem Value="4">旅游度假</asp:ListItem>
                        <asp:ListItem Value="5">时尚购物</asp:ListItem>
                    </asp:DropDownList>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("CorpTypeName") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        <asp:TemplateField HeaderText="子类">
            <EditItemTemplate>
                <asp:DropDownList ID="DropDownList1" runat="server" 
                    SelectedValue='<%# Bind("infoType") %>'>
                    <asp:ListItem>场馆</asp:ListItem>
                    <asp:ListItem>手机</asp:ListItem>
                    <asp:ListItem>美食</asp:ListItem>
                    <asp:ListItem>购物</asp:ListItem>
                    <asp:ListItem>数码</asp:ListItem>
                    <asp:ListItem>文化</asp:ListItem>
                    <asp:ListItem Value="品牌"></asp:ListItem>
                    <asp:ListItem Value="美酒"></asp:ListItem>
                    <asp:ListItem>特色</asp:ListItem>
                    <asp:ListItem>美妆</asp:ListItem>
                    <asp:ListItem Value="时尚"></asp:ListItem>
                    <asp:ListItem>榜单</asp:ListItem>
                    <asp:ListItem>行业</asp:ListItem>
                    <asp:ListItem>餐馆</asp:ListItem>
                    <asp:ListItem>爆料</asp:ListItem>
                    <asp:ListItem>专题</asp:ListItem>
                    <asp:ListItem>素食</asp:ListItem>
                    <asp:ListItem>风向</asp:ListItem>
                    <asp:ListItem Value="超市"></asp:ListItem>
                    <asp:ListItem>赛事</asp:ListItem>
                    <asp:ListItem Value="展会"></asp:ListItem>
                    <asp:ListItem>西餐</asp:ListItem>
                    <asp:ListItem>湘菜</asp:ListItem>
                    <asp:ListItem>简餐</asp:ListItem>
                    <asp:ListItem>中餐</asp:ListItem>
                    <asp:ListItem Value="海味"></asp:ListItem>
                    <asp:ListItem Value="素菜"></asp:ListItem>
                    <asp:ListItem>趣闻</asp:ListItem>
                    <asp:ListItem>酒吧</asp:ListItem>
                    <asp:ListItem>品味</asp:ListItem>
                    <asp:ListItem>清吧</asp:ListItem>
                    <asp:ListItem>迪吧</asp:ListItem>
                </asp:DropDownList>
            </EditItemTemplate>
            <InsertItemTemplate>
                <asp:DropDownList ID="DropDownList1" runat="server" 
                    SelectedValue='<%# Bind("infoType") %>'>
                    <asp:ListItem>场馆</asp:ListItem>
                    <asp:ListItem>手机</asp:ListItem>
                    <asp:ListItem>美食</asp:ListItem>
                    <asp:ListItem>购物</asp:ListItem>
                    <asp:ListItem>数码</asp:ListItem>
                    <asp:ListItem>文化</asp:ListItem>
                    <asp:ListItem Value="品牌"></asp:ListItem>
                    <asp:ListItem Value="美酒"></asp:ListItem>
                    <asp:ListItem>特色</asp:ListItem>
                    <asp:ListItem>美妆</asp:ListItem>
                    <asp:ListItem Value="时尚"></asp:ListItem>
                    <asp:ListItem>榜单</asp:ListItem>
                    <asp:ListItem>行业</asp:ListItem>
                    <asp:ListItem>餐馆</asp:ListItem>
                    <asp:ListItem>爆料</asp:ListItem>
                    <asp:ListItem>专题</asp:ListItem>
                    <asp:ListItem>素食</asp:ListItem>
                    <asp:ListItem>风向</asp:ListItem>
                    <asp:ListItem Value="超市"></asp:ListItem>
                    <asp:ListItem>赛事</asp:ListItem>
                    <asp:ListItem Value="展会"></asp:ListItem>
                    <asp:ListItem>西餐</asp:ListItem>
                    <asp:ListItem>湘菜</asp:ListItem>
                    <asp:ListItem>简餐</asp:ListItem>
                    <asp:ListItem>中餐</asp:ListItem>
                    <asp:ListItem Value="海味"></asp:ListItem>
                    <asp:ListItem Value="素菜"></asp:ListItem>
                    <asp:ListItem>趣闻</asp:ListItem>
                    <asp:ListItem>酒吧</asp:ListItem>
                    <asp:ListItem>品味</asp:ListItem>
                    <asp:ListItem>清吧</asp:ListItem>
                    <asp:ListItem>迪吧</asp:ListItem>
                </asp:DropDownList>
              
            </InsertItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%# Bind("InfoType") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
           
        <asp:TemplateField HeaderText="内容" SortExpression="ContentInfo" ItemStyle-Width="312px" ItemStyle-CssClass="Required">
    <EditItemTemplate><input type="hidden" runat="server"  name="editContent" id="editContent" value='<%# Bind("body") %>' /></p>
         <iframe src="../Content/163editor/editor.html?id=DetailsView1_editContent" frameborder="0" scrolling="no" width="670" height="320"></iframe>
  
        </EditItemTemplate>
        <InsertItemTemplate>
        <input type="hidden" runat="server"  name="sContent" id="sContent" value='<%# Bind("body") %>' /></p>
 <iframe src="../Content/163editor/editor.html?id=DetailsView1_sContent" frameborder="0" scrolling="no" width="670" height="320"></iframe>
        </InsertItemTemplate>
        <ItemTemplate>        
        <input type="hidden" runat="server"  name="itemContent" id="itemContent" value='<%# Bind("body") %>' /></p>
         <iframe src="../Content/163editor/editor.html?id=DetailsView1_itemContent" frameborder="0" scrolling="no" width="670" height="320"></iframe>
  
        </ItemTemplate>
<ItemStyle CssClass="Required" Width="312px"></ItemStyle>
    </asp:TemplateField>
            <asp:BoundField DataField="source" HeaderText="来源" 
                SortExpression="source" />
        </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT [InfoID], [InfoType], [ImageUrl], [Body], [source], [CorpTypeID], [Hits], [InfoDate], [AreaID] FROM [Informations]">
    </asp:SqlDataSource>
    <asp:ObjectDataSource ID="odsInformation" runat="server" 
        OldValuesParameterFormatString="{0}" SelectMethod="SelectSingle" 
        TypeName="Model.InformationData" UpdateMethod="Update">
        <UpdateParameters>
            <asp:Parameter Name="infoType" Type="String" />
            <asp:Parameter Name="areaID" Type="String" />
            <asp:Parameter Name="source" Type="String" />
            <asp:Parameter Name="body" Type="String" />
            <asp:Parameter Name="corpTypeID" Type="String" />
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="InfoID" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="DetailsView1" Name="infoID" 
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:Label ID="lblError" runat="server" ForeColor="#CC3300"></asp:Label>
    </form>
</body>
</html>
